1. Field of the Invention
The present invention relates to a displacement sensor which comprises a detector in which an AC magnetic field for detecting an object is generated by an oscillation circuit and detects a distance to a detection object, using a change in oscillation state of the oscillation circuit. More particularly, the present invention relates to technique for creating a conversion table for finding a detection distance from an oscillation state of an oscillation circuit in this kind of sensor (referred to as a displacement sensor or simply a sensor, hereinafter).
2. Description of the Prior Art
According to a proximity-type of displacement sensor intended for a metal body, in general, a high-frequency magnetic field from a detection coil acts on a detection object so that a distance to the detection object is detected (this detected distance is referred to as a detection distance, hereinafter), using a phenomenon in which an oscillation amplitude of the oscillation circuit changes according to a change in inductance due to the act of an eddy current magnetic field from the detection object.
The conventional displacement sensor incorporates a memory in which a conversion table showing the relation between the oscillation amplitude of the oscillation circuit and the detection distance is stored, and a controller such as a microcomputer. The controller finds the distance to the detection object by referring the conversion table to the measured value of the oscillation circuit and outputs it as a voltage signal proportional to the distance.
In the memory of the conventional displacement sensor, a table showing a standard relation between an oscillation amplitude and a detection distance is set every kind of the detection object (this table is referred to as a source table and a curving line of the source table is referred to as a standard curving line, hereinafter. Since the oscillation amplitude is detected as a voltage, it is referred to as an amplitude voltage or simply a voltage as needed.). However, since the relation between the amplitude voltage and the detection distance varies depending on a size of the detection object or variation of the detection coil, when it is necessary to perform high-precision measurement processing, the source table is corrected by teaching assisted by an actual detection object and creates the conversion table according to an installation condition.
Publicly known technique for creating the conversion table is disclosed in the following patent document 1. According to this patent document 1, sensor heads comprising coils are arranged at a point abutting on a detection object (a distance at this point is referred to as the minimum distance hereinafter), a point provided at the farthest distance as far as the detection object can be detected (distance at this point is referred to as the maximum distance, hereinafter), and a middle point between them, and measure amplitude voltages at the points. In addition, apart from these measurement, a voltage in a state which is not affected by the detection object (referred to as an open-state voltage in the patent document 1) is measured and the actually measured values at the three points are normalized by the open-state voltage. Then, the standard curving line corresponding to a range from the minimum distance to the maximum distance is corrected so that the voltages corresponding to the three points may be equal to the normalized actually measured values and its corrected result is stored in the memory as the conversion table.
Patent document 1 is Japanese Unexamined Patent Publication No. 2001-165603.
According to the method of the patent document 1, since each actually measured value is normalized by an open-state voltage so that an influence due to characteristics of the sensor head can be removed from each actually measured value, the high-precision conversion table can be created.
In addition, according to patent document 2 also, voltages are measured at three measurement points such as points corresponding to the minimum distance and the maximum distance and a middle point between them, and a correction value for correcting the amplitude voltage linearly is found, using these actually measured values. According to this document, the voltage at the measurement points of the minimum distance and the maximum distance are measured and shift correction and rotation correction are carried out so that these voltages may reach respective predetermined values. Then, the voltage at the middle point is measured and the shift correction and after the rotation correction are performed on the actually measured value, a correction value which is most suitable for the actually measured values at three points after the correction is called from a storage circuit and set.
Patent document 2 is Japanese Unexamined Patent Publication No. 7-131321.
According to the both patent documents 1 and 2, the voltages are measured while the detection object or the sensor head is moved so that the sensor head may be positioned at three points which were determined for the detection object.
According to this kind of sensor, since the oscillation state could be varied due to an influence of peripheral metal or an electromagnetic wave, it is preferable that the sensor is actually positioned in a usage environment and then the conversion table is created, in order to perform the high-precision measurement processing. However, when the measurement points are fixed like in the patent documents 1 and 2, the measurement at the position corresponding to the measurement point is sometimes difficult (for example, some kind of member is disposed at the position corresponding to the measurement point). In addition, when the open-state voltage is measured like in the patent document 1, it is preferable that the measurement is performed under a condition which is unaffected by the peripheral metal. However, it is considerably difficult to perform such measurement at a place where the sensor is installed.
Thus, when the measurement cannot be performed at the measurement point in the place where the sensor is installed, or in order to precisely measure the open-sate voltage, it is necessary to perform the measurement at another place before the sensor is installed or after the sensor is removed. Therefore, it is difficult to secure precision of the conversion table.
Furthermore, according to the method of the patent document 2, since the shift correction amount and the rotation correction amount are found by measuring the voltages at the measurement points of the minimum distance and the maximum distance and then the voltage is measured at the middle point is performed, the order of the measurement is fixed so that operationality is lowered.
The present invention was made in view of the above problems and it is an object of the present invention to be able to create a conversion table using measured values at any measurement points arbitrarily decided by a user under a condition where a sensor is installed in an actual usage environment, and to be able to create a conversion table suitable for an actual usage environment or usage condition.
A method according to the present invention is a method of creating a conversion table used in process for converting an oscillation state of an oscillation circuit, to a distance to a detection object, in a displacement sensor including a detector in which the oscillation circuit generates an AC magnetic field for detecting the object. The method of creating the conversion table according to the present invention comprises a step of arranging the detection object at each measurement point of any three measurement points whose distance from the displacement sensor is known, in any order and measuring the oscillation state of the oscillation circuit at the measurement point; a step of extracting a range which corresponds to a distance between the nearest measurement point and the farthest measurement point from the detector, in which a ratio between measured values corresponding to measurement points closely resemble a ratio between the actually measured values, from a source table showing a standard relation between the measured value of the oscillation circuit and a distance to the detection object; a step of correcting a measured value included in the range extracted from the source table so that the measured value corresponding to the measurement point may be matched to the actually measured value; and a step of setting a table showing a relation between the measured value after-corrected and the distance as the conversion table.
The above method can be applied to a type of proximity switch having a detector including a detection coil and an oscillation circuit generating a high-frequency magnetic field in this detection coil and being intended for detection of a metal body. In addition, this method can be applied to a capacitance type displacement sensor which has a detector including an electrode and an oscillation circuit and detects a distance from a change in oscillation state according to a change in capacitance of the electrode and a detection object. In addition, the capacitance type displacement sensor can be intended for detection of both metal and nonmetal bodies.
According to the above method, although the oscillation state of the oscillation circuit is the amplitude voltage in general, an oscillation frequency or a phase of the oscillation circuit can be used, for example. In addition, although the distance to each measurement point is preferably a distance from the detection coil or the electrode, this may be a distance from a detection surface (front end surface) of the sensor instead of the above.
The source table can be obtained by measuring the oscillation state by the standard detector while moving a model of the detection object of a predetermined standard by a constant distance, and relating the obtained measured value to the distance. Furthermore, although it is preferable that this source table has been already stored in the memory in the displacement sensor, the sensor may be connected to an external device such as a personal computer and data of the source table may be sent from the external device to the sensor when the conversion table is created, for example.
The step of extraction processing from the source table is based on an idea that variation is generated in the detection distance because of variation due to characteristics of the detection object and the sensor or an influence of a peripheral environment even in the same standard sensor. For example, it can be thought that an oscillation state obtained at a point whose distance from the sensor is known in a sensor A is equivalent to that obtained at a position shifted from the measurement point of the sensor A by a predetermined distance L in another sensor B.
Therefore, it can be thought that the standard curving line of the source table is shifted from the actual measurement point by the variation corresponding to the characteristics of the detection object and the sensor, at the points corresponding to the three measurement points.
Here, when it is assumed that the actually measured values obtained at the three measurement points are Vnear, Vmid and Vfar in increasing order of distance from the displacement sensor and measured values corresponding to the actually measured values Vnear, Vmid and Vfar are Tnear, Tmid and Tfar, respectively on the source table, even if there is a shift in the distance, it can be thought that the distance between the actual measurement points is almost the same as the distance between points corresponding to the measured values Tnear and Tfar. In addition, if it is assumed that the inclination of the standard curving line shown by the source table closely resembles a straight line, when a ratio DT between the measured values and a ratio DV between the actually measured values are found using the following equation (a) and (b), it is thought that DT takes a value closely resembling DV.
DT=(Tfarxe2x88x92Tnear)/(Tmidxe2x88x92Tnear)xe2x80x83xe2x80x83(a)
DV=(Vfarxe2x88x92Vnear)/(Vmidxe2x88x92Vnear)xe2x80x83xe2x80x83(b)
Therefore, when a range corresponding to the distance between the shortest measurement point and the farthest measurement point from the sensor is extracted from the source table, for example, the start of the measured value in the extracted range corresponds to Vnear and the last of the measured value corresponds to Vfar and the measured value corresponding to the distance Vmidxe2x88x92Vnear from the start corresponds to Vmid. Thus, while an extracted position is changed, the measured value corresponding to each measurement point in the extracted range in each extracted position is found, and then it is determined whether the ratio DT between the measured values closely resembles the ratio DV between the actually measured values. Thus, the range showing a change which most closely resembles a signal change of the actually measured value can be extracted.
According to the step of correcting the measured value, the source table is corrected so that the measured values Tnear, Tmid and Tfar corresponding to the measurement points may be matched to the actually measured values Vnear, Vmid and Vfar, respectively in the range extracted from the source table as described above. In this correction, the offset correction is performed for each value in the extracted range so that the measured value Tnear corresponding to the nearest measurement point from the sensor may be matched to the actually measured value Vnear, for example, and then the inclination of the curving line shown by each value in the extracted range is corrected so that the correction value after offset of the measured value Tfar corresponding to the farthest measurement point from the sensor may be matched to the actually measured value Vfar, while Vnear is kept in the matched state.
In addition, in this step, it is preferable that correction is performed in order to correct an error between the measured value corresponding to each point existing between the nearest measurement point and the farthest measurement point, and the actually measured value. Furthermore, since the errors of ends (the measured values corresponding the nearest measurement point and the farthest measurement point) in the extracted range has been corrected in the two stages of corrections, by assuming that the error is increased as the distance from these ends is increased and the error is the maximum at the center position in the extracted range in the third correction, the correction amount to each measured value can be found.
In addition, although it is preferable that the measured values corresponding to the three measurement point coincide with the actually measured values, respectively at the final stage in the above corrections, a little error may be generated in the actually measured value. Still further, it is preferable that the range and each measured value extracted from the source table are normalized by the largest values Tfar and Vfar, respectively, in order to secure precision of the corrections, before the above corrections are performed.
According to the above method, since the range suitable for the characteristics of the detection object and the sensor for the processing is extracted from the source table based on the actually measured values obtained at the three measurement points, and the correction processing for correcting the error between each measured value in the extracted range and the actually measured value is performed, the correction value from which the variation due to the characteristics of the detection object and the sensor is removed can be obtained.
Meanwhile, since the three measurement points used in the above method can be set at any position, the measurement points can be selected so that a range (referred to as a detection range, hereinafter) to be actually detected by the sensor intended for the processing may be defined. In other words, the nearest point from the sensor, the farthest point from the sensor and any point between these points can be the measurement points in the detection range determined by the user. Thus, since the data required for detecting each distance included in the detection range is extracted from the source table and then the conversion table can be set by correcting the data so as to be suitable for the actually measured value of the sensor, the conversion table suitable for the detection range can be easily created. In addition, since the conversion table can be created after the sensor is installed in the usage environment, the variation due to the influence of the peripheral environment can be absorbed, so that high-precision conversion table suitable for the usage condition can be obtained.
In addition, according to this method, since the extraction processing from the source table and correction processing for the source table are performed after the measurement processing for the three measurement points is completed, the measurement processing for each measurement point can be performed in a random order. Still further, the measurement can be performed again at the measurement point which has been measured. In addition, the set positions of the measurement points can be changed and measurement can be performed again as needed.
Furthermore, a displacement sensor according to the present invention comprises a detection coil; an oscillation circuit for generating a high-frequency magnetic field in the detection coil; a controller for inputting a signal showing an oscillation state of the oscillation circuit and detecting a distance to a detection object; a memory for storing a conversion table for detecting the distance; and an operation portion for inputting data showing a distance to the detection object.
Meanwhile, this displacement sensor can separate the detection coil from another circuit as a sensor head, or a part of a circuit such as a resonance capacitor in an oscillation circuit may be included in a sensor head.
Furthermore, it is necessary to incorporate a detection circuit and an A/D conversion circuit in this displacement sensor in order to quantize and take out the oscillation state of the oscillation circuit. As the memory, it may be an internal memory in the control circuit or a memory for storing the conversion table may be separately incorporated. In addition, the source table can be previously stored in this memory.
The operation portion can be set so as to input degree data in which a predetermined distance is designated as one unit (10 mm is designated by 1 degree, for example) as well as to input a value itself showing the distance. Furthermore, this operation portion is not limited to the constitution in which the user directly input the numeral value, and may be constituted so as to display the numeral value to be input and receive a selection operation. Still further, although the operation portion may be provided on the surface of the sensor body, it may be a remote operation portion separated from the sensor body.
The controller comprises actually measured value recognizing means for inputting a signal showing an oscillation state of the oscillation circuit while corresponds to the data input from the operation portion and recognizing a value of the obtained signal as a measured value corresponding to the distance of the input data; extracting means for extracting a range which corresponds to a difference between the farthest distance and the shortest distance, in which a ratio between measured values corresponding to three measurement points closely resembles a ratio between the actually measured values, from a source table showing a standard relation between the measured value of the oscillation circuit and a distance to the detection object, based on a recognition result of the actually measured value recognizing means for any three distances; correcting means for correcting a measured value included in the range extracted by the extracting means so that the measured value corresponding to the distance may be matched to the actually measured value; and storing means for storing the relation between the measured value after corrected and distance in the memory as the conversion table.
The controller is preferably constituted by a computer in which a program for performing the processing of each means is incorporated. However, the present invention is not limited to this and each means or any one of means may be constituted by a component such as an ASIC (Application Specific Integrated Circuit).
The actually measured value recognizing means takes in the signal showing the oscillation state such as the amplitude voltage and the frequency just after the data is input from the operation portion, for example and then recognizes the value shown by the signal as the actually measured value corresponding to the distance shown by the input data. In addition, the signal is not always taken in after the data is input, and the data input may be received after the signal is taken in.
The three distances and actually measured values corresponding to the distances in the extracting means correspond to the above described distances and actually measured values corresponding to the three measurement points. The extracting means performs extraction processing so as to extract a range used in creating the conversion table, from the source table, based on these distances and actually measured values. In addition, after the correcting means performs the correction processing in the extracted range and then the table showing the relation between the measured value after corrected and the distance is set as the conversion table and stored in the memory by the storing means.
According to the above displacement sensor, the user can set the detection object at the nearest point from the sensor, the farthest point from the sensor and any point between these two points in the detection range set by the user and input data showing the distance between each point and the sensor after the sensor is installed. The controller inputs a signal showing the oscillation state of the oscillation circuit each time receives the input of the distances of the three points, and performs creation processing of the conversion table using the actually measured values recognized by this signal and the distances to automatically create the conversion table suitable for the characteristics of the detection object and the sensor and the usage condition. Thus, high-precision measurement processing can be performed by using this conversion table thereafter.
Furthermore, according to this conversion table, since the oscillation state is measured according to the input of the distance, and distance of each measurement point and the actually measured value can be related and recognized, the measuring order can be set at random and operationality at the time of setting processing can be improved.
In addition, the data input from the operation portion is not limited to the three measurement points and distances from four or more measurement points can be input. In this case, the control circuit can recognize a size of an extracted range in the source table, based on the difference between the farthest distance and the nearest distance and perform the extraction processing to the source table, using the actually measured value corresponding to these distances and three actually measured values corresponding to any other distances (meanwhile, the extract processing based on a ratio between four or more actually measured values can be performed). In addition, in the correct processing, further high-precision corrections can be performed using actually measured values other than the three actually measured values.
According to a displacement sensor of a still preferred embodiment, the operation portion is set so as to be able to perform a confirming operation, and the actually measured value recognizing means of the controller comprises modifying means for modifying the recognition result by receiving a retype for the already recognized actually measured value or a distance until the confirming operation is performed.
According to the above aspect, since the oscillation state can be measured again and data can be input many times as needed for each measurement point until the confirming operation is performed, even when the user fails to position the detection object or fails to input the data, modification processing for the failed measurement point can be easily performed and its convenience and operationality can be improved.